Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: increase default number of channels when gRPC-GCP channel pool is enabled #1997

Merged
merged 19 commits into from
Oct 19, 2022

Conversation

harshachinta
Copy link
Contributor

Fixes #1566

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Sep 6, 2022
@rajatbhatta
Copy link
Contributor

Try running mvn com.coveo:fmt-maven-plugin:format to get rid of linting errors.

@harshachinta harshachinta marked this pull request as ready for review September 7, 2022 09:40
@harshachinta harshachinta requested a review from a team as a code owner September 7, 2022 09:40
@harshachinta harshachinta requested review from olavloite, ansh0l and rajatbhatta and removed request for olavloite and ansh0l October 18, 2022 09:29
@rajatbhatta rajatbhatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2022
@rajatbhatta rajatbhatta added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Oct 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 18, 2022
@gcf-owl-bot gcf-owl-bot bot requested a review from a team as a code owner October 18, 2022 11:28
@harshachinta harshachinta requested review from olavloite and removed request for rajatbhatta October 18, 2022 13:00
Copy link
Collaborator

@olavloite olavloite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit on setting the default numChannels, otherwise LGTM

Comment on lines 1139 to 1141
if (this.numChannels == null) {
this.numChannels = GRPC_GCP_ENABLED_DEFAULT_CHANNELS;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this and instead assign the default number of channels in the build method for both GCP enabled and disabled. (See also below)

@@ -1166,6 +1172,10 @@ public SpannerOptions build() {
// As we are using plain text, we should never send any credentials.
this.setCredentials(NoCredentials.getInstance());
}
if (this.numChannels == null) {
this.numChannels = DEFAULT_CHANNELS;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.num

Suggested change
this.numChannels = DEFAULT_CHANNELS;
this.numChannels = this.grpcGcpExtensionEnabled ? GRPC_GCP_ENABLED_DEFAULT_CHANNELS : DEFAULT_CHANNELS;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion @olavloite. This makes it more readable than the previous one.
I have made the changes in the recent commit.

@rajatbhatta rajatbhatta added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 19, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 19, 2022
@rajatbhatta rajatbhatta added the automerge Merge the pull request once unit tests and other checks pass. label Oct 19, 2022
@rajatbhatta rajatbhatta merged commit 44f27fc into googleapis:main Oct 19, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 19, 2022
gcf-merge-on-green bot pushed a commit that referenced this pull request Oct 28, 2022
🤖 I have created a release *beep* *boop*
---


## [6.32.0](https://togithub.com/googleapis/java-spanner/compare/v6.31.2...v6.32.0) (2022-10-27)


### Features

* Enable client to server compression ([#2117](https://togithub.com/googleapis/java-spanner/issues/2117)) ([50f8425](https://togithub.com/googleapis/java-spanner/commit/50f8425fe9e1db16ed060337d26feccc9a9813e2))
* Increase default number of channels when gRPC-GCP channel pool is enabled ([#1997](https://togithub.com/googleapis/java-spanner/issues/1997)) ([44f27fc](https://togithub.com/googleapis/java-spanner/commit/44f27fc90fa3f9f4914574fb0476e971da4c02ff))
* Update result_set.proto to return undeclared parameters in ExecuteSql API ([#2101](https://togithub.com/googleapis/java-spanner/issues/2101)) ([826eb93](https://togithub.com/googleapis/java-spanner/commit/826eb9305095db064f52a15dc502bc0e0df9a984))


### Dependencies

* Update dependency com.google.cloud:google-cloud-monitoring to v3.4.6 ([#2093](https://togithub.com/googleapis/java-spanner/issues/2093)) ([b08db44](https://togithub.com/googleapis/java-spanner/commit/b08db443229afdc1d49ef9f5e459cade5e2abe90))
* Update dependency com.google.cloud:google-cloud-monitoring to v3.5.0 ([#2113](https://togithub.com/googleapis/java-spanner/issues/2113)) ([99d825b](https://togithub.com/googleapis/java-spanner/commit/99d825b18397ff9e8633b89effa05e61159d956f))
* Update dependency com.google.cloud:google-cloud-monitoring to v3.6.0 ([#2125](https://togithub.com/googleapis/java-spanner/issues/2125)) ([7d86fe4](https://togithub.com/googleapis/java-spanner/commit/7d86fe40de29311ad65bd382e55f75326d16c4e3))
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 ([#2122](https://togithub.com/googleapis/java-spanner/issues/2122)) ([308a65c](https://togithub.com/googleapis/java-spanner/commit/308a65c3e07e33f82b7ce474e0e95099192bb593))
* Update dependency com.google.cloud:google-cloud-trace to v2.3.7 ([#2094](https://togithub.com/googleapis/java-spanner/issues/2094)) ([6ec3f3f](https://togithub.com/googleapis/java-spanner/commit/6ec3f3f585ed5eaecdb09d5fd1eb6c9af3b22555))
* Update dependency com.google.cloud:google-cloud-trace to v2.4.0 ([#2114](https://togithub.com/googleapis/java-spanner/issues/2114)) ([84347f1](https://togithub.com/googleapis/java-spanner/commit/84347f1c6a52f3dfe569649f061cb16e2e466f6a))
* Update dependency com.google.cloud:google-cloud-trace to v2.5.0 ([#2126](https://togithub.com/googleapis/java-spanner/issues/2126)) ([5167928](https://togithub.com/googleapis/java-spanner/commit/516792809cf976aeab10709ca62503b7f03bb333))
* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 ([#2109](https://togithub.com/googleapis/java-spanner/issues/2109)) ([bf092ad](https://togithub.com/googleapis/java-spanner/commit/bf092ad7ac86c500e8a445397e192cb8fb0594ae))
* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 ([#2119](https://togithub.com/googleapis/java-spanner/issues/2119)) ([b2d27e8](https://togithub.com/googleapis/java-spanner/commit/b2d27e8f841cab096d5ccad64a250c7f0b35f670))
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 ([#2110](https://togithub.com/googleapis/java-spanner/issues/2110)) ([d28b202](https://togithub.com/googleapis/java-spanner/commit/d28b202cfc29e8fbbfdf3612b94bab5c2f319419))
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 ([#2120](https://togithub.com/googleapis/java-spanner/issues/2120)) ([151cf77](https://togithub.com/googleapis/java-spanner/commit/151cf778ff76edaee9e849181f72119ffa6cb897))
* Update dependency org.graalvm.sdk:graal-sdk to v22.2.0.1 ([#2102](https://togithub.com/googleapis/java-spanner/issues/2102)) ([68c2089](https://togithub.com/googleapis/java-spanner/commit/68c2089101124b9887af57b2697c35a64eb1a51f))
* Update dependency org.graalvm.sdk:graal-sdk to v22.3.0 ([#2116](https://togithub.com/googleapis/java-spanner/issues/2116)) ([9d6930b](https://togithub.com/googleapis/java-spanner/commit/9d6930b77ec479e5f517236852244476c23dc5c8))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provision more channels with fewer sessions in each when using gRPC-GCP channel pool
5 participants